<%@page import="java.util.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<% String path = request.getContextPath();
	String basePath = request.getScheme()+"://" +request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="css/backstyle.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="js/jquery-1.8.2.js"></script>
	<script type="text/javascript" src="js/getParentType.js"></script>
	<script type="text/javascript">
		$(function (){
			//初始化父类型（大类）
			getParentType();
			//给父类别设置改变事件
			$("#option").change(function () {
				var id = $(this).val();
				getParentChildren(id)
			})
		})
	</script>
</head>

<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">首页</a></li>
    <li><a href="#">添加商品</a></li>
    </ul>
    </div>
    
    <div class="formbody">
    
    <div class="formtitle"><span>添加商品</span></div>
    <form method="post" enctype="multipart/form-data" action="/ProductController/addProduct">
    	<ul class="forminfo">
	    <li><label>商品名称</label><input name="name" type="text" class="dfinput" /><i>标题不能超过30个字符</i></li>
	    <li><label>所属大类</label>
	    		<select name="type1" id="option">
					<option value="">请选择类别</option>
	    		</select>
	    		
	    </li>
	    <li><label>所属小类</label>
	    		<select name="type2" id="option2">
					<option value="0">请先选择大类</option>
	    		</select>
	    </li>
	     <li><label>商品图片</label><input name="pngUrl" type="file" /></li>
	    <li><label>商品价格</label><input name="price" type="text" class="dfinput" /></li>
	    <li><label>商品库存</label><input name="stock" type="text" class="dfinput" /></li>
	    <li><label>商品描述</label><textarea rows="8" cols="40" name="des" ></textarea></li>
	    <li><label>&nbsp;</label><input  type="submit" class="btn" value="确认保存"/></li>
	    </ul>
    
    </form>
    </div>
<div style="display:none"><script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540' language='JavaScript' charset='gb2312'></script></div>
</body>
</html>

